GDK: Use GdkCursor objects to keep track of W32 cursors, not HCURSOR
authorРуслан Ижбулатов <lrn1986@gmail.com>
Sun, 3 May 2015 21:29:35 +0000 (21:29 +0000)
committerРуслан Ижбулатов <lrn1986@gmail.com>
Wed, 20 May 2015 08:40:43 +0000 (08:40 +0000)
commit641fbd86d796bb0f7838b1d7387031a106386439
tree1d61a9cac3782c6d74dda4a0cae4161f149a47e4
parent7fef713224583ab906d0875eedcf7a76534eff0f
GDK: Use GdkCursor objects to keep track of W32 cursors, not HCURSOR

In particular this means that cursors are disposed of by the way of
g_object_unref(), not DestroyCursor (which is documented to not to be
used on certain kinds of cursors, and we can't tell which is which).

It should also alleviate any concerns about destroying cursors that
are still in use by other windows, except for cases where we would
somehow get our hands on a HCURSOR that someone else is using and we
make a GdkCursor out of it and later unref and finalize it while it
is still in use.

It also removes the need to call CopyCursor(), which makes animated
cursors into non-animated ones as a side-effect (supposed to be a bug,
but try explaining that to MS). Now cursors should be animated (if
the are set up as such in the OS).

https://bugzilla.gnome.org/show_bug.cgi?id=697477
gdk/win32/gdkdevice-virtual.c
gdk/win32/gdkevents-win32.c
gdk/win32/gdkprivate-win32.h
gdk/win32/gdkwindow-win32.c
gdk/win32/gdkwindow-win32.h